package com.kongyz.observer;

import com.kongyz.Subject;

/**
 * @author kongyz
 * @date 2018/7/3 21:47
 * @Description: 八进制
 */
public class OctalObserver extends Observer {

    public OctalObserver(Subject subject) {
        this.subject=subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("八进制："+Integer.toOctalString(subject.getState()));
    }
}
